package com.szamc.tableroundapi.model.RecursionTable;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ColumnGroupItem {
    private String id;
    private int index;
    private int groupIndex;
    private int value;
    private List<Integer> groupIndexPathList;

    public ColumnGroupItem(String id, int index, int groupIndex,int value, List<Integer> groupIndexPathList) {
        List<Integer> _groupIndexPathList = new ArrayList<>(groupIndexPathList);
        _groupIndexPathList.remove(groupIndexPathList.size() - 1);
        this.id = id;
        this.index = index;
        this.groupIndex = groupIndex;
        this.value = value;
        this.groupIndexPathList = _groupIndexPathList;
    }
}
